import request from '@/utils/request'

/**
 * 登录
 */
export function login(data) {
  return request({
    url: '/admin/login.do',
    method: 'post',
    data
  })
}
/**
 * 获取用户信息
 */
export function getInfo(userId) {
  return request({
    url: '/admin/user/userInfo.do',
    method: 'get',
    params: { userId }
  })
}
/**
 * 退出登录
 */
export function logout() {
  return request({
    url: '/admin/logout.do',
    method: 'get'
  })
}
/**
 * 修改密码userid=&password=
 */
export function updatePwd(data) {
  return request({
    url: '/admin/user/updatePwd.do',
    method: 'post',
    data
  })
}
/**
 * 发验证码/sms//sendYzm.do?userid
 */
export function sendYzm(data) {
  return request({
    url: '/sms/sendYzm.do',
    method: 'post',
    data
  })
}
